<B>已绑定商家</B>
<table id="supplier" class="ui-widget ui-widget-content" width="100%">
	<thead>
		<tr class="ui-widget-header ">
			<th>商家</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
	<?php
		foreach ($result_mine as $item){
			echo '<tr>';
			echo '<td>['.$item["id"].']-'.$item["name"].'</td>';
			echo '<td><button class="unbindSupplierBtn" supplierid="'.$item["id"].'">解除绑定</button></td>';
		}
	?>
	</tbody>
</table>
<BR/>
<BR/>
<B>未绑定商家</B>
<table id="supplier" class="ui-widget ui-widget-content" width="100%">
	<tr>
		<td>商家</td>
		<td>
			<div class="ui-widget">
				<select id="combobox" name="membersupplier">
					<?php 
						foreach ($result_others as $item){
							echo '<option value="'.$item["id"].'"';
							echo '>['.$item["id"].']-'.$item["name"].'</option>';
						}
					?>
				</select>
			</div>
		</td>
		<td>
			<button id="bind-supplier">绑定</button>
		</td>
	</tr>
</table>
<style>
	.ui-button { margin-left: -1px; }
	.ui-button-icon-only .ui-button-text { padding: 0.35em; } 
	.ui-autocomplete-input { margin: 0; padding: 0.48em 0 0.47em 0.45em; }
</style>
<script type="text/javascript" src="<?php echo URL::base()?>jquery/development-bundle/ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="<?php echo URL::base()?>jquery/development-bundle/ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="<?php echo URL::base()?>jquery/development-bundle/ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="<?php echo URL::base()?>jquery/development-bundle/ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="<?php echo URL::base()?>jquery/development-bundle/ui/jquery.ui.autocomplete.js"></script>
<script type="text/javascript" src="<?php echo URL::base()?>js/self_autocomplete.js"></script>
<script>
$(function() {
	$( "#combobox" ).combobox();
	$("#bind-supplier").button().click(function() {
		bindSupplier();
	});
	$(".unbindSupplierBtn").button().click(function() {
		unBindSupplier($(this).attr("supplierid"));
	});
});
</script>